1. Field of the Invention
The present invention generally relates to image processing devices, and particularly relates to an image processing device having a function of removing the aliasing generated through sampling of an image.
2. Description of the Prior Art
A wide variety of application fields using computer image generation include designs, games, arts, commercial films, cartoons, simulations, etc. In these application fields, realism is pursued so that a generated image should be as realistic as possible.
Computer-generated images typically have a problem of aliasing, which is generated by digital sampling of an image at a time of model generation or at a time of display on a screen. In the computer-generated images, the aliasing appears as stair-stepped contours of image objects, i.e., so called "jaggies".
Generally, image processing or image generation is carried out at a predetermined coordinate in each pixel of an image. Since a pixel occupies an area of a certain size, processing only at a predetermined coordinate in each pixel will lose some information about the image. For example, a pixel is assigned to a dark tone when the predetermined coordinate in that pixel is dark, even if there is a bright portion in that pixel. This causes the aliasing.
There are various anti-aliasing algorithms for removing the aliasing.
A super-sampling method assigns a plurality of dots such as 4.times.4 dots, 8.times.8 dots, or the like of a frame buffer to one pixel of a CRT to draw a picture in the frame buffer. This frame buffer has a memory size 16 times greater, 64 times greater, etc. Then, this method uses an average value of the plurality of dots for a corresponding dot of the CRT.
A filtering method removes the aliasing by filtering images.
Other methods include a method of calculating an area occupied by a given object in a given pixel by clipping the object within the pixel, and a method of calculating area proportions of objects in a given pixel by using auxiliary scan lines called sub scan lines.
Further another anti-aliasing method is disclosed in the Japanese Patent Laid-Open Application No.3-139774. This anti-aliasing method applies a filtering operation to discontinuity regions in a Z buffer, thereby avoiding blurring of an entire image. Namely, this method is an augmented version of the filtering method described above.
Also, there are anti-aliasing methods used in texture mapping. These methods include a method of integrating colors of mapping patterns in one dot of the screen, a method of sampling a plurality of mapping-pattern colors with equal intervals for one dot of the screen, and a method of sampling a plurality of mapping-pattern colors at random for one dot of the screen.
The super-sampling method described above generates a high-quality image at an expense of device costs. That is, when one dot is comprised of 8.times.8 dots, for example, the memory volume of the frame buffer becomes 64 times as large. Such an increase in the memory volume makes the image processing device costly.
The filtering method has a problem in that an entire image is blurred through the filtering process.
The method of applying a filtering operation to a Z buffer needs a mask memory for storing the discontinuity regions detected in the Z buffer. The use of the mask memory leads to an increase in the cost. Also, a differential filter needs to be applied to the entire image to detect the discontinuity regions, so that a performance in terms of a drawing speed is deteriorated.
Accordingly, there is a need for an image generation device which can remove the aliasing without an increase in memory and a decrease in a drawing speed.